<?php

class Base_Mapper {
	protected $logger;
	protected $tableName;
	protected $_dbTable = null;
	
	
   
	public function setDbTable($dbTable)
	{
		if (is_string($dbTable)) {
			$dbTable = new $dbTable();
		}
		if (!$dbTable instanceof Zend_Db_Table_Abstract) {
			throw new Exception('Invalid table data gateway provided');
		}
		$this->_dbTable = $dbTable;
		return $this;
	}
   
	public function getDbTable()
	{
		if (null === $this->_dbTable) {
			$this->setDbTable($this->tableName);
		}
		return $this->_dbTable;
	}
	
   
	function __construct() {
		$this->logger = Zend_Registry::get("logger");
	}
}

?>